package com.gupao.study.autoconfiguration;

import com.gupao.study.HelloFormatTemplate;
import com.gupao.study.formater.FormateProcessor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author wangenji
 * @Date 2019-07-07 14:11
 */

@Import(ProcessorConfiguration.class)
@EnableConfigurationProperties(HelloProperties.class)
@Configuration
public class HelloAutoConfiguration {

    @Bean
    public HelloFormatTemplate helloFormatTemplate(FormateProcessor formateProcessor,HelloProperties helloProperties){
        return new HelloFormatTemplate(formateProcessor,helloProperties);
    }
}
